#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main2()
{
    int a, b, s;
    b = 1;
    while (b < 3)
    {
        scanf("%d", &a);
        s = a % 5;
        if (s == 0)
        {
            printf("YES\n");


        }
        else
        {
            printf("NO\n");
        }
        b = b + 1;
    }


    return 0;

}